import $axios from './axios.js';
// 登录
export const login = param => {
  return new Promise((resolve) => {
    $axios.post(`/base-server/checkUser`,param).then((response) => {
      const data = response.data;
      if(data.success) {
        resolve(data)
      }else {
        $Message.error('请求错误')
      }
    }).catch( error => {
      console.log(error);
      $Message.error('请求错误')
    });
  });
};